package org.jiamandan.com.constant;

import java.util.Arrays;
import java.util.List;

/**
 * @version Revision 1.0.1
 * @版权：版权所有 (c) 2021
 * @author:Jmd

 * @see:
 * @创建日期：2022-09-22 16:38
 * @功能说明：
 * @begin
 * @修改记录:
 * @修改后版本 修改人        修改内容
 * @2022-09-22 16:38	         Jmd        	创建
 * @end
 */
public interface BizConstant {

    String separator = "/";
    String separator1 = ":";

    interface Common {
        String CREATE_TIME = "create_time";
        String CREATE_TIME_POJO = "createTime";
        String ORG_CODE = "org_Code";
        String ORG_CODE_POJO = "orgCode";
        Integer DIV = 2;
    }

    interface UserType {
        //'10-代理商 20-商户 30- 业务员'
        Integer AGENT = 10;
        Integer MERCHANT = 20;
        Integer SALES = 30;
    }

    interface Status {
        //  状态  0-未生效 1-已生效 2-已失效
        Integer NO_ACTIVE = 0;
        Integer ACTIVE = 1;
        Integer UN_ACTIVE = 2;
    }

    /**
     * 10绑定  15解绑 20 冻结 25 取消冻结 30 挂失
     */
    interface Card {
        Integer bind = 10;
        Integer un_bind = 15;
        Integer freeze = 20;
        Integer un_freeze = 25;
        Integer loss = 30;
        Integer need_pwd = 1;
        Integer un_need_pwd = 0;
    }

    /**
     * 0-未绑定  1已绑定 2 冻结 3 挂失
     */
    interface IsBind {
        Integer unbind = 0;
        Integer bind = 1;
        Integer freeze = 2;
        Integer loss = 3;
    }

    interface Bills {
        interface BillsType {
            //'流水类型: 0 收入 1 支出',
            Integer IN_COME = 0;
            Integer PAY_OUT = 1;
            Integer RECHARGE = 2;
        }

        interface EventType {
            // '事件类型 0-充电退款 1-充值退款 2-人工录入 3-充电佣金 4-提现 5-提现手续费 6-提现失败 7月卡充电 8赠送活动'
            Integer CHARGE_REFUND = 0;
            Integer RECHARGE_REFUND = 1;
            Integer MANUAL = 2;
            Integer COMMISSION = 3;
            Integer CASH_OUT = 4;
            Integer CASH_SERVICE_CHARGE = 5;
            Integer CASH_FAIL = 6;
            Integer MONTHLY_CARD_CHARGE = 7;
            Integer GIVEAWAY = 8;
        }
    }

    interface Cmd {
        /**
         * 4.2. CMD=1 应答签到
         */
        String CMD_1 = "01";
        /**
         * 4.1. CMD=2 上报签到
         */
        String CMD_2 = "2";
        /**
         * 5.1. CMD=101 下发启动充电
         */
        String CMD_101 = "101";
        /**
         * 5.2. CMD=102 应答启动充电
         */
        String CMD_102 = "102";
        /**
         * 5.3. CMD=105 下发停止充电
         */
        String CMD_105 = "105";

        /**
         * 5.4. CMD=106 应答停止充电
         */
        String CMD_106 = "106";
        /**
         * 5.5. CMD=109 下发控制命令
         */
        String CMD_109 = "109";
        /**
         * 5.6. CMD=110 应答控制命令
         */
        String CMD_110 = "110";
        /**
         * 5.7. CMD=111 下发时间同步
         */
        String CMD_111 = "111";
        /**
         * 5.7. CMD=112 下发时间同步应答
         */
        String CMD_112 = "112";
        /**
         * 6.1. CMD=302 上报实时数据
         */
        String CMD_302 = "302";
        /**
         * 6.2. CMD=301 应答实时数据
         */
        String CMD_301 = "301";
        /**
         * 6.3. CMD=306 上报告警数据
         */
        String CMD_306 = "306";
        /**
         * 6.4. CMD=305 应答告警数据
         */
        String CMD_305 = "305";
        /**
         * 6.6. CMD=309 应答 BMS 属性参数
         */
        String CMD_309 = "309";
        /**
         * 6.5. CMD=310 上报 BMS 属性参数
         */
        String CMD_310 = "310";
        /**
         * 6.7. CMD=314 上报充电卡帐户请求充电
         */
        String CMD_313 = "313";
        /**
         * 6.8. CMD=313 应答充电卡帐户请求充电
         */
        String CMD_314 = "314";
        /**
         * 6.10. CMD=317 应答 VIN 帐户请求充电
         */
        String CMD_317 = "317";
        /**
         * 6.9. CMD=318 上报 VIN 帐户请求充电
         */
        String CMD_318 = "318";
        /**
         * 6.10. CMD=317 应答 VIN 帐户请求充电
         */
        String CMD_321 = "321";
        /**
         * 6.9. CMD=318 上报 VIN 帐户请求充电
         */
        String CMD_322 = "322";
        /**
         * CMD=501 查询计费模
         */
        String CMD_501 = "501";
        /**
         * CMD=502 充电桩应答查询计费模
         */
        String CMD_502 = "502";
        /**
         * CMD=503 查询计费模型（电单车）
         */
        String CMD_503 = "503";
        /**
         * CMD=504 充电桩应答计费模型（电单车）
         */
        String CMD_504 = "504";
        /**
         * CMD=505 下发计费模型
         */
        String CMD_505 = "505";
        /**
         * CMD=506 充电桩应答下发计费模型
         */
        String CMD_506 = "506";
        /**
         * CMD=507 下发计费模型（电单车）
         */
        String CMD_507 = "507";
        /**
         * CMD=508 充电桩应答下发计费模型（电单车）
         */
        String CMD_508 = "508";
        /**
         * CMD=701 下发查询参
         */
        String CMD_701 = "701";
        /**
         * CMD=703 下发设置参数
         */
        String CMD_703 = "703";
        /**
         * CMD=703 下发设置参数
         */
        String CMD_704 = "704";
        /**
         * CMD=901 下发 FTP 升级
         */
        String CMD_901 = "901";
        //JMD-YD===============
        /**
         * CMD=20 设备注册
         */
        String CMD_YD_20 = "20";
        /**
         * CMD=21 设备心跳
         */
        String CMD_YD_21 = "21";
        /**
         * CMD=22 设备获取时间
         */
        String CMD_YD_22 = "22";
        /**
         * CMD=12 主机获取时间
         */
        String CMD_YD_12 = "12";
        /**
         * CMD=03 结算消费信息上传
         */
        String CMD_YD_03 = "03";
        /**
         * CMD=06 端口充电时功率心跳包  服务器无须应答
         */
        String CMD_YD_06 = "06";
        /**
         * CMD=82 服务器开始、停止充电操作
         */
        String CMD_YD_82 = "82";
        /**
         * CMD=8a 服务器修改充电时长/电量
         */
        String CMD_YD_8a = "8a";
        /**
         * CMD=81 注2、此命令会触发设备立即发送“注册包”20、“设备心跳包”01和21指令，快速获取设备状态
         */
        String CMD_YD_81 = "81";

        String CMD_YD_02 = "02";

        //JSY A0
        String CMD_JSY_A0 = "A0";
        //JSY A1
        String CMD_JSY_A1 = "A1";

        String CMD_JSY_33 = "33";
    }

    interface CmdClass {
        String CMD_2_SERVICE = "zdUploadSignInListenerService";
        String CMD_101_SERVICE = "zdIssueChargeService";
        String CMD_102_SERVICE = "zdChargeReplyListenerService";
        String CMD_106_SERVICE = "zdStopReplyListenerService";
        String CMD_110_SERVICE = "zdCtrlReplyListenerService";
        String CMD_112_SERVICE = "zdTimeReplyListenerService";
        String CMD_302_SERVICE = "zdDataReportListenerService";
        String CMD_306_SERVICE = "zdAlarmListenerService";
        String CMD_310_SERVICE = "zdBmsListenerService";
        String CMD_314_SERVICE = "zdAccountListenerService";
        String CMD_318_SERVICE = "zdVinListenerService";
        String CMD_322_SERVICE = "zdChargeRecordListenerService";
        String CMD_501_SERVICE = "zdissueBillingModeService";
        String CMD_502_SERVICE = "zdQueryTimeBillinglistenerService";
        String CMD_503_SERVICE = "zdissueBillingModeService";
        String CMD_504_SERVICE = "zdQueryPowerBillinglistenerService";
        String CMD_505_SERVICE = "zdissueBillingModeService";
        String CMD_506_SERVICE = "zdIssueTimeBillinglistenerService";
        String CMD_507_SERVICE = "zdissueBillingModeService";
        String CMD_508_SERVICE = "zdIssuePowerBillinglistenerService";
        String CMD_702_SERVICE = "zdQueryConfiglistenerService";
        String CMD_704_SERVICE = "zdUpdateConfiglistenerService";
        String CMD_901_SERVICE = "ZDIssueUpgradeService";
        String CMD_902_SERVICE = "zdUpgradelistenerService";
        String CMD_YD_20_SERVICE = "ydSignlistenerService";
        String CMD_YD_21_SERVICE = "ydDeviceHeartlistenerService";
        String CMD_YD_22_SERVICE = "ydDeviceTimelistenerService";
        String CMD_YD_12_SERVICE = "ydHostTimeListenerService";
        String CMD_YD_03_SERVICE = "ydChargeRecordlistenerService";
        String CMD_YD_06_SERVICE = "ydChargeRecordHeartlistenerService";
        String CMD_YD_82_SERVICE = "ydIssueChargeListenerService";
        String CMD_YD_8a_SERVICE = "ydIssueChargeTimeListenerService";
        String CMD_JSY_A0_SERVICE = "jsyIssueChargeAddressListenerService";
        String CMD_JSY_T00001_SERVICE = "jsyHeartbeatListener";
        String CMD_JSY_T00204_SERVICE = "jsyActualStatusListener";
        String CMD_YD_02_SERVICE = "ydPunchTheCardListenerService";
    }

    interface OrderStatus {
        // 订单状态: 0-订单未支付 1-订单支付成功 2-订单支付超时 3-订单支付失败 4-启动充电中 5-充电中 6-余额退款中 7-余额已退款 8-结算完成 9-充电失败 10-退款失败 11-结算失败
        Integer UNPAID = 0;
        //已支付
        Integer PAID = 1;
        //支付超时
        Integer PAYMENT_TIMEOUT = 2;
        //支付失败
        Integer PAYMENT_FAILURE = 3;
        //启动充电中
        Integer START_CHARGING = 4;
        //充电中
        Integer CHARGING = 5;
        //退款中
        Integer BEING_REFUNDED = 6;
        //余额退款
        Integer BALANCE_REFUNDED = 7;
        //结算完成
        Integer COMPLETION_OF_SETTLEMENT = 8;
        //设备充电失败
        Integer CHARGING_FAILURE = 9;
        //结算完成，订单微信退款失败
        Integer REFUNDED_FAILURE = 10;
        //1、未设置计费模型
        Integer FAILURE_OF_SETTLEMENT = 11;
        //月卡退款失败
        Integer FAILURE_OF_MONTH_CARD = 12;
        //月卡退款
        Integer MONTH_CARD_REFUNDED = 13;
    }

    interface ProfitStatus {
        // 分润状态: 0-未分润 1-已分润
        Integer PROFIT_NO = 0;
        Integer PROFIT_YES = 1;
    }

    /**
     * 硬件厂商对应端口
     */
    interface HardSoftFactoryPort {
        // JMD-YX走此端口
        Integer YU_XIN = 18082;

        Integer YD_XIN = 18080;
        //JMD-JSY
        Integer JSY_XIN = 18083;

        List<Integer> JSY_PORTS = Arrays.asList(19001, 19002, 19003, 19004, 19005, 19006, 19007, 19008, 19009);
    }

    /**
     * 订单充电状态: 0 充电中 1 占位中 2 未充电 3已完成
     */
//    interface ChargeStatus {
//        /**
//         * 0 空闲
//         */
//
//        Integer FREE = 0;
//
//        /**
//         * 1 充电中
//         */
//        Integer CHARGING = 1;
//        /**
//         * 2 结算完成
//         */
//        Integer SETTLEMENT = 0;
//        /**
//         * 3余额退款中
//         */
//        Integer UNDER_YI = 3;
//        /**
//         * 4余额已退款
//         */
//        Integer REFUNDED = 4;
//        /**
//         * 5充电失败
//         */
//        Integer FAIL = 5;
//    }

    interface OnOffLine {
        Integer OFFLINE = 0;
        Integer ONLINE = 1;
//        Integer UN_REGISTER = 1;
//        Integer ONLINE = 2;
//        Integer OFFLINE = 3;
    }


    interface ZhiDian {
        String START_PREFIX = "68";
        String END_PREFIX = "16";
    }

    /**
     * 是否插枪
     * '0 断开 1 连接 2待启动'
     */
    interface LinkStatus {
        Integer UN_LINK = 0;
        Integer LINK = 1;
        Integer PRE_START = 2;
    }

    /**
     * '0 空闲 1正在启动充电中 2充电进行中 3充电完成 4充电桩故障 5平台设置暂停服务 '
     */
    interface WorkStatus {
        Integer FREE = 0;
        Integer PLAN_CHARGING = 1;
        Integer CHARGING = 2;
        Integer COMPLETE = 3;
        Integer FAULT = 4;
        Integer TEMPORARILY_CLOSED = 5;
    }


    interface payType {
        //微信支付
        Integer WXZF = 0;
        //支付宝支付
        Integer ZFBZF = 1;
        //银联支付
        Integer BANKZF = 2;
        //余额支付
        Integer BANLANCE = 3;
        //其他方式支付
        Integer OTHER_PAY = 4;
        //月卡支付
        Integer MONTHLY_CARD_PAY = 5;
    }

    interface payStatus {
        //0待支付
        Integer WATING_PAY = 0;
        //1已支付
        Integer PAID = 1;
        //2已取消
        Integer CANCEL = 2;
        //3退款中
        Integer UNDER_REFUND = 3;
        //4已退款',
        Integer REFUNDED = 4;
        //5支付失败',
        Integer PAY_FAIL = 5;
    }

    interface Source {
        Integer WECHAR = 0;
        Integer CARD = 1;
    }
}
